2. Unsupervised Learning

2.1. Import Modules

Import relevant modules in one place.

2.2 Get and Preprocess Data

Bitcoin

Exogenous

Merge the datasets.

2.3 Clustering

The idea is to find if some dates can be grouped together.

2.3.1 Visualizations

2.3.2 Algorithms

(1) K-means

Find the optimal number of clusters.

Plot the optimal values.

(2) K-Means with Differencing

Detrending the series to avoid the autocorrelation.

Plot the optimal values. Although hard to figure out the number in this case.